import React, { useEffect } from "react";
import { HeaderWrapper } from './style'

interface HeaderProps{
    banners:any[]
}

const Header:React.FC<HeaderProps>=(props)=>{
    const {
        banners
    }=props
 
    return(
        <HeaderWrapper>
         {banners[0]==undefined?'':
         <div className="header-h">
            <img src={banners[0].img} alt="" />
            <div className="header-body">
                <img src={banners[1].img} alt="" />
                <img src={banners[2].img} alt="" />
            </div>
         </div>
         }  
         <div className="header-search">
            <div className="search-city">
                <span>南昌</span>
                <span className="search-city-triangle"></span>
            </div>
            <input type="text" placeholder="搜索价格/品牌车型" />
            <button>搜索</button>
         </div>     
        </HeaderWrapper>
    )
}

export default   Header